    package com.ruoyi.web.controller.project;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.project.domain.entity.ProjectDetailLog;
import com.ruoyi.project.domain.entity.ProjectPay;
import com.ruoyi.project.domain.query.ProjectDetailLogQuery;
import com.ruoyi.project.domain.query.ProjectPayQuery;
import com.ruoyi.project.service.IProjectDetailLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

    @RestController
    @RequestMapping("/project/log")
    @Api(tags = "附件信息", description = "附件信息")
    public class ProjectDetailLogController {


        @Resource
        private IProjectDetailLogService projectDetailLogService;

        @ApiOperation("分页")
        @GetMapping(value = "/list")
        public R getList(ProjectDetailLogQuery query) {
            return R.ok(projectDetailLogService.getList(query));
        }



        @ApiOperation("新增")
        @PostMapping(value = "/save")
        public R add(@RequestBody ProjectDetailLog project) {
            return R.ok(projectDetailLogService.addInfo(project));
        }


        @ApiOperation("修改")
        @PutMapping (value = "/update")
        public R update(@RequestBody ProjectDetailLog project) {
            return R.ok(projectDetailLogService.updateInfo(project));
        }


        @ApiOperation("删除")
        @DeleteMapping (value = "/{id}")
        public R delete(  @PathVariable("id") Long id) {
            return R.ok(projectDetailLogService.deleteInfo(id));
        }



        @ApiOperation("详情")
        @GetMapping(value = "/details")
        public R<ProjectDetailLog> getDetails(@RequestParam Long id) {
            ProjectDetailLog byId = projectDetailLogService.getById(id);
            return R.ok(byId);
        }


    }
